<template>
  <div>
    <ul v-for="(item,index) in arr" :key="index">
      <li> {{item}}</li>
    </ul>
    <button @click="add">新增</button>
    <ul v-for="item in arrlist" :key="item.id">
      <li>{{item.id}}--{{item.name}}</li>
    </ul>
    <button @click="zc">加入</button>
  </div>
</template>

<script>
export default {
  name: 'BrandManagementApp',

  data() {
    return {
      arr:[1,2,3,4,6,7,8,9],
      arrlist:[
        {id:1,name:'王昊'},
        {id:3,name:'易俊翰'}
      ]
    };
  },

  mounted() {
    
  },

  methods: {
    // 点击数组新增
    add(){
      this.arr.splice(4,0,5)
    },
    zc(){
      this.arrlist.splice(1,0,{id:9527,name:'你'})
    }
  },
};
</script>

<style lang="scss" scoped>

</style>